package com.stk.sinous;

import org.andengine.engine.handler.physics.PhysicsHandler;
import org.andengine.entity.primitive.Line;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

public class Tail extends Line{
	private final PhysicsHandler physicsHandler;
	private static final float DEMO_VELOCITY = 100.0f;

	public Tail(float pX1, float pY1, float pX2, float pY2, float pLineWidth, VertexBufferObjectManager vertexBufferObjectManager) {
		super(pX1, pY1, pX2, pY2, pLineWidth, vertexBufferObjectManager);
		this.physicsHandler = new PhysicsHandler(this);
        this.registerUpdateHandler(this.physicsHandler);
        this.physicsHandler.setVelocity(DEMO_VELOCITY, DEMO_VELOCITY);        
        
        this.setColor(1f, 0f, 0f);
	}

}
